import Vue from "vue";
import Router from "vue-router";
import Home from "@/components/common/Home";
import FirstPage from "@/components/pages/FirstPage";
import Login from "@/components/common/Login";
import SysMenu from "@/components/pages/sys/sysMenu";
import sysRole from "@/components/pages/sys/sysRole";
import sysUser from "@/components/pages/sys/sysUser";
import ShoppingCar from "@/components/pages/shop/ShoppingCar";
import ProductType from "@/components/pages/sys/productType";
import Product from "@/components/pages/sys/product";
import Order from "@/components/pages/sys/order";
import ShoppingCart from "@/components/pages/sys/shoppingCart";
import ShoppingLogin from "@/components/pages/shop/Login";
import ShoppingHome from "@/components/pages/shop/Home";
import ShoppingDetails from "@/components/pages/shop/Details";
import ShoppingOrderOrCar from "@/components/pages/shop/OrderOrCar";


Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/home',
            name: 'Home',
            component: Home,
            redirect: 'firstPage',
            children: [
                {
                    path: '/',
                    name: 'firstPage',
                    component: FirstPage
                }, {
                    path: '/SysMenu',
                    name: 'sysMenu',
                    component: SysMenu
                },
                {
                    path: '/sysRole',
                    name: 'sysRole',
                    component: sysRole
                },
                {
                    path: '/sysUser',
                    name: 'sysUser',
                    component: sysUser
                },
                {
                    path: '/shop/order',
                    name: 'order',
                    component: Order
                },
                {
                    path: '/shop/productType',
                    name: 'productType',
                    component: ProductType
                },
                {
                    path: '/shop/product',
                    name: 'product',
                    component: Product
                },
                {
                    path: '/shop/shoppingCart',
                    name: 'shoppingCart',
                    component: ShoppingCart
                }
            ]
        },
        {
            path: '/',
            name: 'Login',
            component: Login
        },
        {
            path: '/shop/shoppingCar',
            name: 'ShoppingCar',
            component: ShoppingCar
        },{
            path: '/shop/login',
            name: 'ShoppingLogin',
            component: ShoppingLogin
        },{
            path: '/shop/home',
            name: 'ShoppingHome',
            component: ShoppingHome
        },{
            path: '/shop/details',
            name: 'ShoppingDetails',
            component: ShoppingDetails
        },{
            path: '/shop/shoppingOrderOrCar',
            name: 'ShoppingOrderOrCar',
            component: ShoppingOrderOrCar
        },



    ]
})


